shifting horizontal vertical functions